//
//  NSString+Custom.m
//  WeboCon
//
//  Created by black sun on 12-3-5.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import "NSString+Custom.h"


@implementation NSString (Custom)

-(NSString *)appendQueryParameter:(NSDictionary *)params{
    NSMutableString *url = [[NSMutableString alloc] initWithString:self];
    if ([self rangeOfString:@"?"].location==NSNotFound) {
        [url appendString:@"?"];
    }
    for (NSString *key in params) {
        [url appendFormat:@"&%@=%@",key,[[params objectForKey:key] description]];
    }
    return url;
}

@end
